package com.monlyu.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.monlyu.annotation.Comment;

/*******************************************************************************
 * 
 * <b>功能描述☞</b>串联单的后期人员打分表<br>
 * 
 * <b>开发公司☞</b>重庆唯尼科技有限公司<br>
 * <b>版权☞</b>本文件归重庆唯尼科技有限公司所有<br>
 * <b>项目名☞</b>news<br>
 * <b>文件路径☞</b>com.monlyu.vo.StaffScore.java<br>
 * <b>开发日期☞</b>2010-3-25 <br>
 * 
 * @author chendan
 * @since JDK 5
 * @version 1.0.8
 * 
 ******************************************************************************/
@Entity(name = "t_StaffScore")
@Comment(common = "串联单的后期人员打分表")
public class StaffScore extends BaseVo {

	@Id
	@Column(name = "s_id")
	@Comment(common = "编号")
	private Long id;

	@ManyToOne
	@JoinColumn(name = "s_programming")
	@Comment(common = "栏目")
	private Programming programming;

	//photo-出像人员 maker-制作人员 light-灯光  zimu-字幕
	@Column(name = "s_type")
	@Comment(common = "人员角色")
	private String type;

	@ManyToOne
	@JoinColumn(name = "s_user")
	@Comment(common = "人员")
	private User user;

	/** 外键关联到枚举类型表 */
	@Column(name = "s_score")
	@Comment(common = "分数")
	private Long score;

	@ManyToOne
	@JoinColumn(name = "s_gradeUser")
	@Comment(common = "打分人")
	private User gradeUser;

	@Column(name = "s_date")
	@Comment(common = "打分时间")
	private Date date;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Programming getProgramming() {
		return programming;
	}

	public void setProgramming(Programming programming) {
		this.programming = programming;
	}

	public String getType() {
		if ("photo".equals(type)) {
			return "出像人员";
		} else if ("maker".equals(type)) {
			return "制作人员";
		} else if ("light".equals(type)) {
			return "灯光";
		} else if ("zimu".equals(type)) {
			return "字幕";
		} else {
			return type;
		}
	}

	public void setType(String type) {
		this.type = type;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Long getScore() {
		return score;
	}

	public void setScore(Long score) {
		this.score = score;
	}

	public User getGradeUser() {
		return gradeUser;
	}

	public void setGradeUser(User gradeUser) {
		this.gradeUser = gradeUser;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
}
